{extend name="common/application" /}
{block name="title"}<title id="title">店铺中心-首页</title>{/block}
{block name="css"}
<link rel="stylesheet" type="text/css" href="_CSS_/reset.css">
<link rel="stylesheet" type="text/css" href="_CSS_/common.css">
<link rel="stylesheet" type="text/css" href="_CSS_/help.css"/>
<link rel="stylesheet" type="text/css" href="_CSS_/store_center.css"/>
<!--[if lt IE 9]>
<script src="http://www.ijquery.cn/js/html5shiv.js"></script>
<![endif]-->
<style>
.store-info .store-logo img{border-radius:0;}
</style>
{/block}


{block name="content"}
<!-- 主体内容 -->
<div class="main">
    <div class="mainBody normalBox clearfix">
        <!--左菜单-->
        {include file="/common/left" /}
        <!--右内容-->
        <div class="menuContent fr">
            <div class="menuConHeader">
                <!--面包屑导航-->
                <div class="breadcrumb">
                    <p>
                        <a href="javascript:;">店铺管理</a> &gt;
                        <a class="curPage" href="{:url('index/store/index')}">店铺首页</a>
                    </p>
                </div>
            </div>
            <div class="menuConBody">
                <div class="courseMenu">
                    <div class="conBody">
                        <div class="store-info">
                            <div class="store-logo">
                                <img src="_IMG_/store.jpg">
                            </div>
                            <div class="store-message">
                                <div class="store-name"><p></p></div>
                                <div class="store-att">
                                    <!-- 企业和个人店铺显示不同的标签 -->
                                    <p><span class="icons sp1"></span><span class="icons icon-sp3"></span></p>
                                </div>
                                <div class="store-scope">
                                    <p>
                                    </p>
                                </div>
                                <div class="store-in"><p><span>店铺收藏数:<b></b>次</span><span>店铺浏览量:<b></b>次</span></p>
                                </div>
                            </div>
                        </div>

                        <div class="store-record">
                            <!-- 交易店铺信息 -->
                            <div class="record-box">
                                <div class="record-title">
                                    <p>交易类商品</p>
                                </div>
                                <div class="record-list trading">
                                    <dl>
                                        <dt>商品管理</dt>
                                        <dd>出售中的商品:<span></span></dd>
                                        <dd>待上架的商品:<span></span></dd>
                                    </dl>
                                    <dl>
                                        <dt>订单提醒</dt>
                                        <dd>待选择订单: <span></span></dd>
                                        <dd>待付款订单: <span></span></dd>
                                        <dd>待确认订单: <span></span></dd>
                                        <dd>已完成订单: <span></span></dd>
                                    </dl>
                                    <dl>
                                        <dt>交易概况</dt>
                                        <dd>支付买家数：<span></span></dd>
                                        <dd style="width:180px;">支付金额：<span></span></dd>
                                    </dl>
                                </div>
                            </div>
                            <!-- 服务店铺信息 -->
                            <div class="record-box mr0">
                                <div class="record-title">
                                    <p>服务类商品</p>
                                </div>
                                <div class="record-list service">
                                    <dl>
                                        <dt>商品管理</dt>
                                        <dd>出售中的商品:<span></span></dd>
                                        <dd>待上架的商品:<span></span></dd>
                                    </dl>
                                    <dl>
                                        <dt>订单提醒</dt>
                                        <dd>待付款订单: <span></span></dd>
                                        <dd>待确认订单: <span></span></dd>
                                        <dd>待评价订单: <span></span></dd>
                                        <dd>已完成订单: <span></span></dd>
                                        <dd>退款中订单: <span></span></dd>
                                    </dl>
                                    <dl>
                                        <dt>交易概况</dt>
                                        <dd>支付买家数：<span></span></dd>
                                        <dd style="width:180px;">支付金额：<span></span></dd>
                                    </dl>
                                </div>
                            </div>
                        </div>


                    </div>
                </div>
            </div>

        </div>
    </div>
</div>

{/block}
{block name="js"}
<!-- 脚本引入 -->
<script src="_P_/layer/layer.js"></script>
<script>
    $(document).ready(function () {
        $('.li0').addClass('showChild');
        $('.li00').addClass('activeMenu');
    });
    $(function () {
        var userinfo = $.cookie('userinfo');
        if (userinfo != null) {
            var user_login = $.base64.decode(userinfo).split(",");
            $.ajax({
                type: "get",
                url: "{:url('api/shop/index')}",
                data: {'uid': user_login[0]},
                dataType: 'jsonp',
                success: function (msg) {
					if (msg.code == 1000) {
                        layer.msg(msg.message, {icon: 5, time: 1000}, function () {
                            window.location.href = "{:url('index/store/store_open1')}";
                        });
                    }
					if (msg.code == 1001) {
                        layer.msg(msg.message, {icon: 5, time: 1000}, function () {
                            window.location.href = "{:url('index/store/store_open6')}";
                        });
                    }
					if (msg.code == 1002) {
                        layer.msg(msg.message, {icon: 5, time: 1000}, function () {
                            window.location.href = "{:url('index/store/store_open7')}";
                        });
                    }
                    if (msg.code == 200) {
                        if (msg.data.shop_id == 1) {
                            $(".mr0").hide();
                        }
                        if(msg.data.image == null){
							$(".store-logo img").attr('src', "/static/web/images/store.jpg");
						}else{
							$(".store-logo img").attr('src', "/Images/Information/" + msg.data.image);
						}
                        $(".store-name p").text(msg.data.name);
                        if (msg.data.label_shop.length > 0) {
                            for (var i = 0; i < msg.data.label_shop.length; i++) {
                                if ($.inArray(msg.data.label_shop[i].id + '', msg.data.label) != -1) {
                                    $('.store-scope p').append('<span>' + msg.data.label_shop[i].name + '</span>');
                                }
                            }
                        }
						var money01 = number_format(msg.data.status7, 2, ".", ",");
						var money02 = number_format(msg.data.static7, 2, ".", ",");
                        $(".store-in b").eq(0).text(msg.data.collect);
                        $(".store-in b").eq(1).text(msg.data.shop_view);
                        $(".trading span").eq(0).text(msg.data.shop_count);
                        $(".trading span").eq(1).text(msg.data.trading_count);
                        $(".trading span").eq(2).text(msg.data.status1);
                        $(".trading span").eq(3).text(msg.data.status2);
                        $(".trading span").eq(4).text(msg.data.status3);
                        $(".trading span").eq(5).text(msg.data.status5);
                        $(".trading span").eq(6).text(msg.data.status6);
                        $(".trading span").eq(7).text('￥'+money01);

                        $(".sp1").text(msg.data.shop_name);

                        $(".service span").eq(0).text(msg.data.service_count);
                        $(".service span").eq(1).text(msg.data.s_count);
                        $(".service span").eq(2).text(msg.data.static1);
                        $(".service span").eq(3).text(msg.data.static2);
                        $(".service span").eq(4).text(msg.data.static3);
                        $(".service span").eq(5).text(msg.data.static4);
                        $(".service span").eq(6).text(msg.data.static5);
                        $(".service span").eq(7).text(msg.data.static6);
                        $(".service span").eq(8).text('￥'+money02);

                    } 
					
                }
            })
        } else {
            window.location.href = "{:url('index/login/index')}";
        }
    })
</script>
{/block}

			